/***************************************************************************
 * 文件名：ProgramStartMode
 * 功能：
 * 说明：
 * -------------------------------------------------------------------------
 * 创建时间：2025/7/18 16:45:29
 * 创建人：葛浩
 * 邮箱：2094733071@qq.com
 * =========================================================================
 *
 * 修改人：   
 * 修改时间：   
 * 修改说明：   
 ***************************************************************************/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Linq;

namespace AuxiliaryTools
{
	public class ProgramStartMode
	{
		/// <summary>
		/// exe   另起线程调用
		/// </summary>
		public const string IndependentThreads = "IndependentThreads";

		/// <summary>
		/// dll继承接口调用
		/// </summary>
		public const string InterfaceCall = "InterfaceCall";

		private static readonly Dictionary<string, string> _Names = new Dictionary<string, string>
			{
				{IndependentThreads, "独立线程" },
				{InterfaceCall, "接口调用" }
			};

		public static string[] GetAllKeys()
		{
			return _Names.Keys.ToArray();
		}

		public static string GetName(string key)
		{
			return key == null || !_Names.ContainsKey(key) ? key : _Names[key];
		}

		/// <summary>
		/// 键值列表
		/// </summary>
		/// <returns></returns>
		public static List<KeyValuePair<string, string>> GetList()
		{
			return _Names.ToList();
		}
	}
}
